package cn.lisynet.user.controller;

import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.lisynet.user.entity.User;
import cn.lisynet.user.service.AddTaskService;
import cn.lisynet.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author lisy
 */
@RestController
public class HomeController {
    @Autowired
    private UserService userService;
    @RequestMapping("/home")
    public String home() throws Exception {
        User user = new User();
        user.setAge(110);
        user.setName("hutool");
        userService.addUser(user);
        return "success";
    }
}
